package Jop;

import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;

public class CleanJob1 {
    public static String mergeString(String position, JSONArray company) throws JSONException {
        String result = "";
        if (company.length() != 0) {
            for (int i = 0; i < company.length(); i++) {
                result = result + company.get(i) + "-";
            }
        }
        if (position != "") {
            String[] positionList = position.split("|;|,|、|,|;|/");
            for (int i = 0; i < positionList.length; i++) {
                result = result + positionList[i].replaceAll("[\\pP\\p{Punct}]", "") + "-";
            }
        }
        return result.substring(0, result.length() - 1);
    }
}
